package com.whpost.service.zhdt.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.whpost.service.entity.t.TCzy;
import com.whpost.service.zhdt.entity.ZhdtWgxx;
import org.apache.ibatis.annotations.*;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author YinZhuoyi
 * @since 2025-07-09
 */
public interface ZhdtWgxxMapper extends BaseMapper<ZhdtWgxx> {
    @Select("select * from zhdt_wgxx where ${ew.sqlSegment}")
    @Results(id="wgxxMap",value = {
            @Result(column="wgfz_id",property="zWgfz",
                    one=@One(
                            select="com.whpost.service.zhdt.dao.ZhdtWgfzMapper.selectById")
            ),
            @Result(column="xzjg_id",property="tXzjg",
                    one=@One(
                            select="com.whpost.service.dao.t.TXzjgDao.selectById")
            ),
            @Result(column="xzjg_id",property="xzjgId"),
            @Result(column="wgfz_id",property="wgfzId")
    })
    IPage<ZhdtWgxx> getZhtdWgxxPage(Page<ZhdtWgxx> page, @Param("ew") QueryWrapper wrapper);
}
